Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend support for Python 3.10 #240

Merged
merged 29 commits into from
Nov 2, 2022
Merged

Extend support for Python 3.10 #240

merged 29 commits into from
Nov 2, 2022

Conversation

santisoler
Copy link
Member

@santisoler santisoler commented Aug 27, 2021

Bump the latest end on GitHub Actions tests to Python 3.10. Build docs in
GitHub Actions using Python 3.10. Bump environment to Python 3.10. Add Python
3.10 to setup.cfg.

@hugovk
Copy link
Member

hugovk commented Aug 28, 2021

For pooch and boule, 3.10-dev is needed because it's passed to https:/actions/setup-python to set up the Python version.

However, here we're passing it to https:/conda-incubator/setup-miniconda so we'll need to check if they have a version of 3.10 available and how to use it.

@leouieda
Copy link
Member

@santisoler I would also recommend only testing the 2 end-member versions instead of every single one (e.g 3.6 and 3.10 only). That would cut down a lot on the amount of CI we use and would catch pretty much everything we care about catching.

@santisoler santisoler added this to the v0.3 milestone Oct 18, 2021
@santisoler santisoler removed this from the v0.3 milestone Oct 19, 2021
@santisoler
Copy link
Member Author

Good news: now tests pass on Python 3.10! 🎉

Bad news: there's a compatibility problem between Numba and Numpy on Python 3.10 when installed through conda/mamba.
Numba 0.55.* needs Numpy <= 1.21 because Numpy 1.22 is not supported yet (see numba/numba#7754). Therefore, right now we cannot install Harmonica under Python 3.10 using conda or mamba, and so the docs fail to build.

Maybe we should wait until Numba add further support, or should we pin Numpy for now?

cc @leouieda @LL-Geo

@leouieda
Copy link
Member

Great! I would wait for this a bit more since there's no point adding a pinning which we'll have to remove soon anyway.

@santisoler santisoler added this to the v0.5.0 milestone Apr 23, 2022
@hugovk
Copy link
Member

hugovk commented May 3, 2022

ERROR: Could not find a version that satisfies the requirement vtk>=9 (from versions: none)
ERROR: No matching distribution found for vtk>=9

No Python 3.10 wheels yet: https://pypi.org/project/vtk/#files

https://gitlab.kitware.com/vtk/vtk/-/issues/18335 is the tracking issue.

A fix has been merged: https://gitlab.kitware.com/vtk/vtk/-/issues/18335#note_1164493 but not released.

For a workaround there's an unofficial build: https://gitlab.kitware.com/vtk/vtk/-/issues/18335#note_1180656

See https://discourse.vtk.org/t/vtk-9-2-0-release-cycle/8149 for planned VTK release schedule, but I don't see any of the planned release candidates at https://pypi.org/project/vtk/#history so I guess they're running a bit behind.

@santisoler
Copy link
Member Author

Thanks for the hint @hugovk.

That workaround is an unofficial build made by pyvista. In fact, in conda-forge we can install VTK on Python 3.10: pyvista/pyvista#2064

So, the things that are holding us back are:

  • No official build of VTK for Python 3.10 in PyPI (solvable through the unofficial build)
  • Numba needs Numpy <= 1.21 (we can pin Numpy for now)

Should we keep waiting or apply those patches now and remember to remove them in the future?

cc @leouieda

@santisoler santisoler modified the milestones: v0.5.0, v0.6.0 Aug 12, 2022
@santisoler
Copy link
Member Author

After more time than I wanted, I think we can safely extend support to Python 3.10. The tests that are failing are only for Python 3.7 (see #355).

@santisoler santisoler merged commit 14681bf into main Nov 2, 2022
@santisoler santisoler deleted the py3.10 branch November 2, 2022 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants